package a.stategy;

import java.util.Scanner;

public class Client {

    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);
        System.out.println("请输入单价和数量：");
        System.out.println("单价:");
        int text=sc.nextInt();
        System.out.println("数量:");
        int num=sc.nextInt();
        System.out.println("请选择收费策略");
        String select=sc.next();
       CashContext cashContext=new CashContext(select);

        double totalPrices;
        totalPrices=cashContext.GetResult(Double.parseDouble(String.valueOf(text*num)));
        System.out.println("结果为："+totalPrices);
    }



}
